<?php
session_start();
include_once( 'lib/config.php' );
include_once( 'lib/oauth_lib.php' );
include_once( 'lib/weibooauth.php' );

$o = new WeiboOAuth( WB_AKEY , WB_SKEY , $_SESSION['keys']['oauth_token'] , $_SESSION['keys']['oauth_token_secret']  );

$last_key = $o->getAccessToken(  $_REQUEST['oauth_verifier'] ) ;

$wb_oauth = $last_key['oauth_token']."\n".$last_key['oauth_token_secret'];

file_put_contents(WB_OAUTH,$wb_oauth);
?>
授权完成,<a href="index.php">返回首页</a>
